package com.jomoo.card.dao;

import java.util.Date;
import java.util.List;

import com.jomoo.common.pojo.JoMooCard;

public interface CardDao {
	/**
	 * 获取产品价格
	 * 
	 * @return
	 * @throws Exception
	 */
	Float getSecondCity(Integer iSPecid) throws Exception;

	/**
	 * 获取一级城市名
	 * 
	 * @return
	 * @throws Exception
	 */
	String getFirstCityName(Integer iFCityId) throws Exception;

	// 持久化任意对象
	Integer saveAllObj(Object obj) throws Exception;
	
	// 查询服务卡
	List<JoMooCard> getServiceCards(String strPopName, String strPopPhone, Integer iCustomerId, Integer iSetupType, 
								Integer iSetupState, Integer iProductType, Integer iProductSpec, String strBeginTime, 
																					Date strEndTime) throws Exception;
	
	// 查询导出服务卡
	List<JoMooCard> getServiceCardForExcle(String strPopName, String strPopPhone,
											Integer iCustomerId, Integer iSetupType, Integer iSetupState,
												Integer iProductType, Integer iProductSpec, String strBeginTime,
																					Date strEndTime) throws Exception;
	
	/**
	 * 作废服务卡
	 * 
	 * @param iCardId
	 * @return
	 * @throws Exception
	 */
	Integer delServiceCard(Integer iCardId) throws Exception;
	
	/**
	 * 作废服务卡同时金额改为不计入结算
	 * 
	 * @param iCardId
	 * @return
	 * @throws Exception
	 */
	Integer delServiceCardAccount(Integer iCardId) throws Exception;
	
	/**
	 * 作废服务卡前查询是否有财务信息存在
	 * 
	 * @param iCardId
	 * @return
	 * @throws Exception
	 */
	Integer getAccountByCardId(Integer iCardId) throws Exception;
	
	/**
	 * 变更服务卡状态
	 * @param iCardId
	 * @param iState
	 * @return
	 * @throws Exception
	 */
	Integer updateCardState(Integer iCardId, Integer iState, String strRemark, Date date) throws Exception;
	
	/**
	 * 服务卡详情
	 * @param iCardId
	 * @return
	 * @throws Exception
	 */
	List<JoMooCard> getCardViews(Integer iCardId) throws Exception;
}
